<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterVulsAddDelayedAtTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('vuls', function (Blueprint $table) {

            $table->timestamp('delayed_at')->nullable()->comment('延迟修复时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        if (Schema::hasColumn('vuls', 'delayed_at')){
            Schema::table('vuls', function (Blueprint $table) {
                $table->dropColumn('delayed_at');
            });
        }
    }
}
